<!DOCTYPE html>
<html class="x-admin-sm" xmlns:th="http://www.thymeleaf.org"
      xmlns:sec="http://www.thymeleaf.org/extras/spring-security">

<head>
    <meta charset="UTF-8">
    <title>首页</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
    <link rel="stylesheet" href="../../static/css/index.css">
    <link rel="stylesheet" href="../../static/css/iconfont.css">
    <script src="../../static/lib/layui/layui.js" charset="utf-8"></script>
    <script type="text/javascript" src="../../static/js/index.js"></script>
    <script src="../../static/js/jquery.js"></script>
    <script src="../../static/js/jquery.min.js"></script>
    <script src="../../static/js/survey.js"></script>
    <style>
        #FontScroll {
            width: 100%;
            height: 245px;
            overflow: hidden;
        }
        
        #FontScroll ul li {
            height: 32px;
            width: 100%;
            color: #ffffff;
            line-height: 32px;
            overflow: hidden;
            font-size: 14px;
        }
        
        #FontScroll ul li i {
            color: red;
        }
        
        .layui-table td,
        .layui-table th {
            min-width: auto !important;
        }
    </style>
</head>

<body>
    <div class="layui-fluid">
        <div class="layui-row layui-col-space15">
            <div class="layui-col-md12">
                <div class="layui-card">
                    <div class="layui-card-body ">
                        <blockquote class="layui-elem-quote">欢迎管理员：
<!--                            <span class="x-red" >admin</span>-->
                            <span class="x-red" sec:authorize="isAuthenticated()" th:text="${userDetail}">admin</span>
                            <span id="time"></span>
                        </blockquote>
                    </div>
                </div>
            </div>
            <div class="layui-col-md12">
                <div class="layui-card">
                    <div class="layui-card-header">数据统计</div>
                    <div class="layui-card-body ">
                        <ul class="layui-row layui-col-space10 layui-this x-admin-carousel x-admin-backlog">
                            <li class="layui-col-md2 layui-col-xs6">
                                <a href="javascript:;" class="x-admin-backlog-body">
                                    <h3>订单数</h3>
                                    <p>
                                        <cite>425</cite></p>
                                </a>
                            </li>
                            <li class="layui-col-md2 layui-col-xs6">
                                <a href="javascript:;" class="x-admin-backlog-body">
                                    <h3>会员数</h3>
                                    <p>
                                        <cite>320</cite></p>
                                </a>
                            </li>
                            <li class="layui-col-md2 layui-col-xs6">
                                <a href="javascript:;" class="x-admin-backlog-body">
                                    <h3>消息</h3>
                                    <p>
                                        <cite>99</cite></p>
                                </a>
                            </li>
                            <li class="layui-col-md2 layui-col-xs6">
                                <a href="javascript:;" class="x-admin-backlog-body">
                                    <h3>公告</h3>
                                    <p>
                                        <cite>125</cite></p>
                                </a>
                            </li>
                            <li class="layui-col-md2 layui-col-xs6">
                                <a href="javascript:;" class="x-admin-backlog-body">
                                    <h3>邮件</h3>
                                    <p>
                                        <cite>110</cite></p>
                                </a>
                            </li>
                            <li class="layui-col-md2 layui-col-xs6 ">
                                <a href="javascript:;" class="x-admin-backlog-body">
                                    <h3>供应商数</h3>
                                    <p>
                                        <cite>163</cite></p>
                                </a>
                            </li>
                        </ul>
                    </div>
                </div>
            </div>
            <div class="layui-col-sm6 layui-col-md4">
                <div class="layui-card">
                    <div class="layui-card-header">信息统计

                    </div>
                    <div class="layui-card-body  ">

                        <table class="layui-table">
                            <thead>

                                <tr class="text-c">
                                    <th>统计</th>
                                    <th>会员需求</th>
                                    <th>产品图片</th>
                                    <th>产品路线</th>
                                    <th>用户数据</th>
                                    <th>管理员数据</th>
                                </tr>
                            </thead>
                            <tbody>
                                <tr class="text-c">
                                    <td>总数</td>
                                    <td>20</td>
                                    <td>20</td>
                                    <td>20</td>
                                    <td>30</td>
                                    <td>20</td>
                                </tr>
                                <tr class="text-c">
                                    <td>今日</td>
                                    <td>30</td>
                                    <td>30</td>
                                    <td>30</td>
                                    <td>30</td>
                                    <td>30</td>
                                </tr>
                                <tr class="text-c">
                                    <td>昨日</td>
                                    <td>30</td>
                                    <td>30</td>
                                    <td>30</td>
                                    <td>30</td>
                                    <td>40</td>
                                </tr>
                                <tr class="text-c">
                                    <td>本周</td>
                                    <td>2</td>
                                    <td>3</td>
                                    <td>5</td>
                                    <td>5</td>
                                    <td>5</td>
                                </tr>
                                <tr class="text-c">
                                    <td>本月</td>
                                    <td>2</td>
                                    <td>0</td>
                                    <td>0</td>
                                    <td>0</td>
                                    <td>0</td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
            <div class="layui-col-sm6 layui-col-md3">
                <div class="layui-card">
                    <div class="layui-card-header">订单种类统计

                    </div>
                    <div class="layui-card-body ">

                        <div id="chart2" style="width: 100%;height: 245px;"></div>
                    </div>
                </div>
            </div>
            <div class="layui-col-sm6 layui-col-md3">
                <div class="layui-card">
                    <div class="layui-card-header">数据月统计

                    </div>
                    <div class="layui-card-body ">

                        <div id="chart4" style="width: 100%;height: 245px;"></div>
                    </div>
                </div>
            </div>

            <div class="layui-col-sm6 layui-col-md2">
                <div class="layui-card">
                    <div class="layui-card-header">最新消息

                    </div>
                    <div class="layui-card-body ">

                        <div class="news_style">

                            <div class="myscroll" id="FontScroll">
                                <ul class="list">
                                    <li><i class="iconfont">&#xe622;</i><a href="#">5月21物美超市加入我们</a></li>
                                    <li><i class="iconfont">&#xe622;</i><a href="#">4月21漯河卫龙加入我们</a></li>

                                    <li><i class="iconfont">&#xe622;</i><a href="#">3月21台湾台积电加入我们</a></li>


                                    <li><i class="iconfont">&#xe622;</i><a href="#">2月21北京医药加入我们</a></li>

                                    <li><i class="iconfont">&#xe622;</i><a href="#">2月11河南医药加入我们</a></li>
                                    <li><i class="iconfont">&#xe622;</i><a href="#">1月28中国银行加入我们</a></li>

                                    <li><i class="iconfont">&#xe622;</i><a href="#">1月21石家庄农场加入我们</a></li>



                                </ul>
                            </div>

                        </div>
                    </div>
                </div>
            </div>

            <div class="layui-col-md12">
                <div class="layui-card">
                    <div class="layui-card-header">正在使用我的管理系统的公司</div>
                    <div class="layui-card-body ">

                        <table class="layui-table">
                            <thead>
                                <tr>
                                    <th colspan="4" scope="col">最近使用的公司</th>
                                </tr>
                            </thead>
                            <tbody>
                                <tr>
                                    <th>公司名称</th>
                                    <td><span id="lbServerName">加入时间</span></td>

                                </tr>
                                <tr th:each="list:${msg}">
                                    <td th:text="${list.getSupplier()}">服务器IP地址</td>
                                    <td th:text="${list.getCreate_time()}">192.168.1.1</td>
                                </tr>


                            </tbody>
                        </table>
                    </div>
                </div>
            </div>


            <div class="layui-col-md12">
                <div class="layui-card">
                    <div class="layui-card-body ">
                        <p style="text-align: center;"><i>Bill账单管理系统</i>&nbsp;&nbsp; Copyright ©2022 All Rights Reserved.</p>
                    </div>
                </div>
            </div>



        </div>
    </div>
    </div>
</body>

<script src="../../static/js/echarts.min.js"></script>
<script type="text/javascript">
    $(function() {
        $('.myscroll').myScroll({
            speed: 60, //数值越大，速度越慢
            rowHeight: 38 //li的高度
        });

    });

    layui.use('layer', function() {
        var layer = layui.layer;
        var remember = '';
        $(document).ready(function() {
            layer.prompt({
                formType: 2,
                anim: 3,
                offset: 'rb',
                value: "",
                title: '便签',
                skin: 'demo-class',
                area: ['280px', '150px'],
                id: 'remember', //设定一个id，防止重复弹出
                btn: ['确定', '取消'],
                shade: 0,
                moveType: 1, //拖拽模式，0或者1
                btn2: function(index, layero) {
                    $.ajax({
                        url: "delremember.html",
                        type: "post",
                        success: function(res) {
                            layer.msg(res.msg);
                            if (res.code == 1) {
                                $('#remember textarea').val('');
                            }
                        }
                    })
                    return false;
                }
            }, function(value, index, elem) {
                $.ajax({
                    url: "/admin/main/remember.shtml",
                    type: "post",
                    data: {
                        message: value
                    },
                    success: function(res) {
                        layer.msg(res.msg);
                    }
                })
            })
        });
    });

    function getTime() {
        var myDate = new Date();
        var myYear = myDate.getFullYear(); //获取完整的年份(4位,1970-????)
        var myMonth = myDate.getMonth() + 1; //获取当前月份(0-11,0代表1月)
        var myToday = myDate.getDate(); //获取当前日(1-31)
        var myDay = myDate.getDay(); //获取当前星期X(0-6,0代表星期天)
        var myHour = myDate.getHours(); //获取当前小时数(0-23)
        var myMinute = myDate.getMinutes(); //获取当前分钟数(0-59)
        var mySecond = myDate.getSeconds(); //获取当前秒数(0-59)
        var week = ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'];
        var nowTime;

        nowTime = myYear + '-' + fillZero(myMonth) + '-' + fillZero(myToday) + '&nbsp;&nbsp;' + fillZero(myHour) + ':' + fillZero(myMinute) + ':' + fillZero(mySecond) + '&nbsp;&nbsp;' + week[myDay] + '&nbsp;&nbsp;';
        //console.log(nowTime);
        $('#time').html(nowTime);
    };

    function fillZero(str) {
        var realNum;
        if (str < 10) {
            realNum = '0' + str;
        } else {
            realNum = str;
        }
        return realNum;
    }
    setInterval(getTime, 1000);
</script>
<script src="../../static/js/fontscroll.js"></script>

</html>